﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace PTUDW_CNTN2010_F_CDT.Models
{
    [Bind(Exclude = "OrderId")]
    public class Order
    {
        [ScaffoldColumn(false)]
        public int OrderId { get; set; }
        
        [ScaffoldColumn(false)]
        public DateTime OrderDate { get; set; }
        
        [ScaffoldColumn(false)]
        public string UserName { get; set; }

        [Required(ErrorMessage = "Full Name is required")]
        [Display(Name = "Họ và Tên")]
        [StringLength(160)]
        public string FullName { get; set; }

        [Required(ErrorMessage = "Address is required")]
        [Display(Name = "Địa chỉ")]
        [StringLength(160)]
        public string Address { get; set; }

        [Required(ErrorMessage = "Phone is required")]
        [Display(Name = "Số điện thoại")]
        [StringLength(160)]
        public string Phone { get; set; }

        [Required(ErrorMessage = "Email is required")]
        [Display(Name = "Email")]
        [StringLength(160)]
        public string Email { get; set; }

        [ScaffoldColumn(false)]
        public float Total { get; set; }

        public List<OrderDetail> OrderDetails { get; set; }
    }
}